<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<jsp:directive.page import="com.toncen.samepms.util.OnLineUserManager"/>
<jsp:directive.page import="com.toncen.samepms.util.SessionListener"/>
<jsp:directive.page import="com.sky.common.http.HTTPUtils"/>
<%
	String type=HTTPUtils.getRequestParameter(request,"type","online");//计数类型
	long numbers;
	if("online".equalsIgnoreCase(type)){
		numbers=OnLineUserManager.getIntance().getOnLineNum();
	}else if("visit".equalsIgnoreCase(type)){
		numbers=(Long)SessionListener.getActiveSessions(session);
	}else{
		response.setStatus(400);
		throw new Exception("未处理的计数类型【"+type+"】，请与系统管理员联系！");
	}
	out.print(numbers);
%>